// pages/main/cpns/top-box/cpns/hard-sel/hard-sel.ts
Component({

  /**
   * 组件的属性列表
   */
  properties: {

  },

  /**
   * 组件的初始数据
   */
  data: {
    activeIndex: 1,

    hardList: [
      {
        name: '3x3',
        size: 3,
      },
      {
        name: '4x4',
        size: 4,
      },
      {
        name: '5x5',
        size: 5,
      },
    ]
  },

  /**
   * 组件的方法列表
   */
  methods: {
    handleClick(e: any) {
      const { index } = e.currentTarget.dataset;

      if (index !== 1) {
        wx.showModal({
          title: '提示',
          content: '没得玩~',
          showCancel: false
        })

        return
      }

      // const { hardList } = this.data;

      // const targetItem = hardList[index];

      // // 通知父组件
      // this.triggerEvent('changeSize', {
      //   size: targetItem.size
      // })
    }
  }
})
